#include "TASK01.h"
#include "semi/InitialEvent.h"
#include "semi/InitialEvent.h"

using namespace semi;
using namespace semi::conf;
using namespace semi::logg;
using namespace semi::db;

void task_start1() {

    Controller* tsk = new TASK01();
    tsk->doProcess("TASK01");

}

void task_start2() {

    Controller* tsk = new TASK01();
    tsk->doProcess("REC011");

}

void task_start3() {

    Controller* tsk = new TASK01();
    tsk->doProcess("INI011");

}

int main() {

    std::cout << "osemi_test_task_db start." << std::endl;

    //    InitialEvent::startup();
    //    task_start1();

    //    task_start2();

    //    TaskManager::shutdown();
    TaskManager::forceShutdown();

    //    semi::MessageEvent event("TASK01");
    //    event.reserveMessage(0, "intercept!");
    //    TaskManager::shutdown("TASK01");

    //    InitialEvent::startup();
    //    task_start3();
    //    semi::MessageEvent event("INI011");
    //    event.reserveMessage(0, "wakeup!");
    //    TaskManager::shutdown("INI011");

    //    cout << posix::MessageTimer::toStringCurrentTimers() << endl;
    //    cout << posix::MessageQue::toStringCurrentQue() << endl;

    cout << TaskManager::toStringCurrentTasks() << endl;

    return 0;
}
